package run;

import gui.JTitledPanel;
import gui.TrunkTab;
import gui.Visualizer;

import java.awt.Dimension;

import javax.swing.JFrame;

import mvc.CurveModelManager;
import mvc.selix.SelixBlock;
import mvc.tubolar.TubolarBlock;

class Launcher {

	//-------------------------------------------------------- class var
	Dimension dcontainer = new Dimension(800,800);
	
	//-------------------------------------------------------- constructor
	//-------------------------------------------------------- and gui initialization
	public Launcher() {
		System.out.println("Laucher > .");
	
		CurveModelManager curvemanager = CurveModelManager.getInstance();
		
		Visualizer container = new Visualizer("Visualizer");
		container.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
		container.setSize(dcontainer);
		container.setVisible(true);
		
		TrunkTab trunk = new TrunkTab("tronco");
		container.addTab(trunk);
		
		JTitledPanel finalCurve = new JTitledPanel("risultante");
		SelixBlock risultante = new SelixBlock("shuffled helix", curvemanager.getSelix());
		finalCurve.add(risultante);
		risultante.init();
		container.addTab(finalCurve);	
		
		JTitledPanel tubolar = new JTitledPanel("tubolar");
		TubolarBlock surface = new TubolarBlock("superficie", curvemanager.getSeliTubolar());
		tubolar.add(surface);
		surface.init();
		container.addTab(tubolar);
	}
	
}